package com.rightsidetech.http.controller.admin.mall;

import com.github.pagehelper.PageInfo;
import com.rightsidetech.commom.base.ResponseData;
import com.rightsidetech.http.aspect.Auth;
import com.rightsidetech.http.aspect.Log;
import com.rightsidetech.http.aspect.Token;
import com.rightsidetech.mall.dto.request.AuditRecordPageReq;
import com.rightsidetech.mall.dto.response.CommodityVerifyRecordResp;
import com.rightsidetech.mall.service.CommodityAuditRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shenyu.client.springmvc.annotation.ShenyuSpringMvcClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/admin/mall_audit/")
@ShenyuSpringMvcClient(path = "/admin/mall_audit/**")
@Api(tags = "商品审核记录相关")
public class MallCommodityAuditRecordController {

    @Resource
    private CommodityAuditRecordService commodityAuditRecordService;

    @Token
    @Log
    @Auth(bizType = Auth.OPERATOR)
    @GetMapping("/page")
    @ApiOperation("分页查询商品审核记录")
    public ResponseData<PageInfo<CommodityVerifyRecordResp>> page(AuditRecordPageReq req){
         return commodityAuditRecordService.page(req);
    }
}
